package com.permission.myannotation;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by Administrator on 2018/6/22
 */
@RestController
@RequestMapping("/test")
public class TestController {

    @TestAnnotation
    @GetMapping("/index")
    public String index(@RequestParam(name = "index", defaultValue = "param") String index) {
        return index;
    }

    @GetMapping("/home")
    public String home() {
        return "home";
    }
}
